<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-twitter" href="{{ $downloadUrl }}" target="_blank"><i class="fa fa-download"></i> 导出</a>
</div>

@if(\Encore\Admin\Facades\Admin::user()->inRoles(['administrator','jp-salesperson']))
    <div class="btn-group pull-right" style="margin-right: 10px">
        <button class='btn btn-sm btn-default check-modal'><i class="fa fa-plus"></i> ForJP</button>
    </div>
    <div class="modal fade" id="checkModal" data-backdrop="static" data-keyboard="false">
        <div class="modal-dialog">
            <div class="modal-content">
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <script language="JavaScript" type="text/javascript">
        $(function () {
            $('.check-modal').on('click', function(e) {
                e.preventDefault();
                $("#checkModal").modal({
                    remote : '/xqc/sales-report/payment-detail-jp-modal?action=paymentDetailForJPExport',
                });
            });
            $("#checkModal").on("hidden.bs.modal", function() {
                $(this).removeData("bs.modal");
                $(this).find(".modal-content").children().remove();
            });
        });
    </script>
@endif
